package com.java8;

import java.util.ArrayList;
import java.util.List;

public class User {
    private String name;
    private Integer age;
    private Integer id;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", id=" + id +
                '}';
    }

    public User(String name, Integer age, Integer id) {
        this.name = name;
        this.age = age;
        this.id = id;
    }

    public static List<User> users(){
        List<User> users=new ArrayList<>();
        users.add(new User("xiaoming",18,1));
        users.add(new User("xiaohua",9,2));
        users.add(new User("xiaohong",5,3));
        users.add(new User("jom",45,4));
        users.add(new User("tom",34,5));
        return users;
    }
}
